package ntu.metaweb.result;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("tag")
public class Tag {
	public String text;
	public int count;
	public int rating;
	public int fontsize;
	
	public Tag(String text, int count, int rating, int fontsize) {
		this.text = text;
		this.count = count;
		this.rating = rating;
		this.fontsize = fontsize;
	}
	
	public int hashCode() {
		return this.text.hashCode();
	}
	
	public boolean equals(Object o) {
		if (o instanceof Tag) {
			Tag t = (Tag) o;
			return this.text.equals(t.text);
		}
		return false;
	}
}
